#include <bits/stdc++.h>

using namespace std;

int a[2100][2100]={0};
int direct_1[2100][2100]={0};
int direct_2[2100][2100]={0};
int direct_3[2100][2100]={0};
int direct_4[2100][2100]={0};
long long ans=0,n;

void dfs(int time,int x,int y,int direct){
	if(time==n){
		if(a[x][y]==0){
			ans++;
		}
		a[x][y]=1;
		return;
	}
	if(direct_1[x][y]==0&&direct!=1&&direct!=3){
		direct_1[x][y]=1;
		dfs(time+1,x,y+1,1);
	}
	if(direct_2[x][y]==0&&direct!=2&&direct!=4){
		direct_2[x][y]=1;
		dfs(time+1,x+1,y,2);
	}
	if(direct_3[x][y]==0&&direct!=1&&direct!=3){
		direct_3[x][y]=1;
		dfs(time+1,x,y-1,3);
	}
	if(direct_4[x][y]==0&&direct!=2&&direct!=4){
		direct_4[x][y]=1;
		dfs(time+1,x-1,y,4);
	}
}

int main(int argc, char const *argv[])
{
	scanf("%d",&n);
	dfs(0,1010,1010,0);
	printf("%lld\n", ans);
	return 0;
}